@layout("/common/_container.html"){
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal">

            <div class="row">
                <div class="col-sm-6 b-r">
                            <#input id="vestname" name="装备名称" underline="true" />
                            <#input id="citySel" name="所属单位" underline="true" readonly="readonly" hidden="deptid"
                            clickFun="UserInfoDlg.showDeptSelectTree(); return false;"
                            style="background-color: #ffffff !important;"/>
                            <#input id="subvechile" name="所属车辆" underline="true"/>
                            <#select id="manufacturer" name="生产企业" underline="true " >
                            </#select>
                            <#select id="devicetype" name="装备类型" underline="true " >
                            </#select>
                </div>

                <div class="col-sm-6">
                            <#select id="supplier" name="供应商" underline="true" >
                            </#select>
                            <#select id="origin" name="产地" underline="true" >
                            </#select>
                            <#input id="configuration" name="配置" underline="true"/>
                            <#select id="lifecycle" name="生命周期" underline="true" >
                            </#select>
                            <#select id="equstate" name="装备状态" underline="true" >
                            </#select>
                            <#input id="rfidtoken" name="rfid编号" underline="true"/>
                </div>
            </div>
            <!-- 这是部门选择的下拉框 -->
            <div id="menuContent" class="menuContent"
                 style="display: none; position: absolute; z-index: 200;">
                <ul id="treeDemo" class="ztree tree-box" style="width: 249px !important;"></ul>
            </div>

            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <#button btnCss="info" name="提交" id="ensure" icon="fa-check" clickFun="CoolingvestInfoDlg.addSubmit()"/>
                    <#button btnCss="danger" name="取消" id="cancel" icon="fa-eraser" clickFun="CoolingvestInfoDlg.close()"/>
                </div>
            </div>
        </div>

    </div>
</div>
<!-------------------------------------------->
<script>
    $(document).ready(function () {
        var url="/dict/deviceTypeList";
        $.ajax({
            type:"get",
            url:url,//访问后台去数据库查询select的选项
            success:function(devicetypeList){
                var unitObj=document.getElementById("devicetype"); //页面上的<html:select>元素
                if(devicetypeList!=null){ //后台传回来的select选项
                    for(var i=0;i<devicetypeList.length;i++){
                        //遍历后台传回的结果，一项项往select中添加option
                        //console.log(devicetypeList[i].num);
                        unitObj.options.add(new Option(devicetypeList[i].name,devicetypeList[i].num));
                    }
                }
            },
            error:function(){
            }
        })
    })
</script>
<!-------------------------------------------->
<script>
    $(document).ready(function () {
        var url="/dict/equStateList";
        $.ajax({
            type:"get",
            url:url,//访问后台去数据库查询select的选项
            success:function(equStateList){
                var unitObj=document.getElementById("equstate"); //页面上的<html:select>元素
                if(equStateList!=null){ //后台传回来的select选项
                    for(var i=0;i<equStateList.length;i++){
                        //遍历后台传回的结果，一项项往select中添加option
                        //console.log(devicetypeList[i].num);
                        unitObj.options.add(new Option(equStateList[i].name,equStateList[i].num));
                    }
                }
            },
            error:function(){
            }
        })
    })
</script>
<!-------------------------------------------->
<script>
    $(document).ready(function () {
        var url="/dict/manufacturerList";
        $.ajax({
            type:"get",
            url:url,//访问后台去数据库查询select的选项
            success:function(manufacturerList){
                var unitObj=document.getElementById("manufacturer"); //页面上的<html:select>元素
                if(manufacturerList!=null){ //后台传回来的select选项
                    for(var i=0;i<manufacturerList.length;i++){
                        //遍历后台传回的结果，一项项往select中添加option
                        //console.log(devicetypeList[i].num);
                        unitObj.options.add(new Option(manufacturerList[i].name,manufacturerList[i].num));
                    }
                }
            },
            error:function(){
            }
        })
    })
</script>
<!-------------------------------------------->
<script>
    $(document).ready(function () {
        var url="/dict/supplierList";
        $.ajax({
            type:"get",
            url:url,//访问后台去数据库查询select的选项
            success:function(supplierList){
                var unitObj=document.getElementById("supplier"); //页面上的<html:select>元素
                if(supplierList!=null){ //后台传回来的select选项
                    for(var i=0;i<supplierList.length;i++){
                        //遍历后台传回的结果，一项项往select中添加option
                        //console.log(devicetypeList[i].num);
                        unitObj.options.add(new Option(supplierList[i].name,supplierList[i].num));
                    }
                }
            },
            error:function(){
            }
        })
    })
</script>
<!-------------------------------------------->
<script>
    $(document).ready(function () {
        var url="/dict/originList";
        $.ajax({
            type:"get",
            url:url,//访问后台去数据库查询select的选项
            success:function(originList){
                var unitObj=document.getElementById("origin"); //页面上的<html:select>元素
                if(originList!=null){ //后台传回来的select选项
                    for(var i=0;i<originList.length;i++){
                        //遍历后台传回的结果，一项项往select中添加option
                        //console.log(devicetypeList[i].num);
                        unitObj.options.add(new Option(originList[i].name,originList[i].num));
                    }
                }
            },
            error:function(){
            }
        })
    })
</script>
<!-------------------------------------------->
<script>
    $(document).ready(function () {
        var url="/dict/lifecycleList";
        $.ajax({
            type:"get",
            url:url,//访问后台去数据库查询select的选项
            success:function(lifecycleList){
                var unitObj=document.getElementById("lifecycle"); //页面上的<html:select>元素
                if(lifecycleList!=null){ //后台传回来的select选项
                    for(var i=0;i<lifecycleList.length;i++){
                        //遍历后台传回的结果，一项项往select中添加option
                        //console.log(devicetypeList[i].num);
                        unitObj.options.add(new Option(lifecycleList[i].name,lifecycleList[i].num));
                    }
                }
            },
            error:function(){
            }
        })
    })
</script>

<script src="${ctxPath}/static/modular/coolingvest/coolingvest/coolingvest_info.js"></script>
<script src="${ctxPath}/static/modular/system/user/user_info.js"></script>
@}
